package ru.isys.view;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SpringLayout;

public class FormItem extends JPanel {

    String name;
    
    SpringLayout layout;
	JTextField refText;
	JTextField classText;
	JTextField labelText;
	JTextField hintText;
	JTextField alertText;
	

	
	public FormItem(String name,String ref) {
		this.name=name;
		

		setSize(100, 25);
		setBorder(BorderFactory.createLineBorder(Color.BLACK));
		setBackground(Color.lightGray);
		setBounds( 5, 5, 650, 45);

		add(new JLabel("class"));
		classText = new JTextField();
		classText.setColumns(15);
		classText.setText("field");
		add(classText);
		
		add(new JLabel("ref = "));
		refText = new JTextField();
		refText.setColumns(15);
		refText.setText(ref);
		add(refText);
		
		
		
		add(new JLabel("label = "));
		labelText = new JTextField();
		labelText.setColumns(15);
		add(labelText);

		add(new JLabel("hint = "));
		hintText = new JTextField();
		hintText.setColumns(15);
		add(hintText);;
		
		add(new JLabel("alert = "));
		alertText = new JTextField();
		alertText.setColumns(15);
		add(alertText);

	}
	
	public String getRefText() {
		return refText.getText();
	}

	public void setRefText(String refText) {
		this.refText.setText(refText);
	}
	public String getClassText() {
		return classText.getText();
	}

	public void setClassText(String classText) {
		this.classText.setText(classText);
	}
	public String getLabelText() {
		return labelText.getText();
	}

	public void setLabelText(String labelText) {
		this.labelText.setText(labelText);
	}
	public String getHintText() {
		return hintText.getText();
	}

	public void setHintText(String hintText) {
		this.hintText.setText(hintText);
	}
	public String getAlertText() {
		return alertText.getText();
	}

	public void setAlertText(String alertText) {
		this.alertText.setText(alertText);
	}
	
	public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

}
